/**
 * Created by Admin on 30.12.2014.
 */

var glControl;
var shaders;
(function ($) {
    $(document).ready(function () {
        var $cube = $("#cube-button");
        $cube.button().attr("disabled", "disabled");
        glControl = new GlControl(document.getElementById("chart-canvas"), {
            onNoWebGl: function () {
                $("<div>Cannot initialize web gl</div>").dialog();
            },
            onRenderStarted: function () {
                var sceneObjects = getSceneObjects();
                glControl.addObjectsToShader(GlShader.COMMON_SHADERS.SIMPLE, sceneObjects.simple);
            },

            onFpsCalculated: function(fps){
                $("#fps").text(fps);
            }
        });


    })
})(window["jQuery"]);